/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author Felipe
 */
public class ConnectionFactory {

    public Connection getConnection() {

        try {
           DriverManager.registerDriver(new com.mysql.jdbc.Driver());
           // return DriverManager.getConnection("jdbc:mysql://sql3.freemysqlhosting.net"
            //        + "/sql341444","sql341444","eD1*cX9%");
           return DriverManager.getConnection("jdbc:mysql://localhost/hotel","root","admin");
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }

    }
    
    
}
